package com.ellricky.teacher.ui.mycourse.course

import android.view.View
import com.ellricky.baselib.BaseConstant
import com.ellricky.baselib.ui.base.PersonListActivity
import com.ellricky.baselib.ui.task.beike.PreLessonDetailActivity
import com.ellricky.baselib.util.EAppUtil
import com.ellricky.teacher.API_COURSE_STU_LIST
import com.ellricky.teacher.R

class CourseStudentActivity : PersonListActivity() {

    private lateinit var id: String
    private lateinit var preId: String

    override fun initUIView() {
        id = intent.getStringExtra(BaseConstant.KEY_ID) ?: ""
        preId = intent.getStringExtra("preId") ?: ""
        super.initUIView()
        mTvTitle.setText(R.string.tc_my_student)
        mBtnRight.visibility = View.VISIBLE
        mBtnRight.text = getString(R.string.base_pre_lesson)
    }

    override fun isShowSex() = true

    override fun initParamMap() {
        paramMap["id"] = id
    }


    override fun getUrlPath() = API_COURSE_STU_LIST

    override fun onClickBtnRight() {
        super.onClickBtnRight()
        EAppUtil.jumpPageWithId(this, PreLessonDetailActivity::class.java, preId)

    }

}
